package model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;

import org.hibernate.validator.constraints.NotEmpty;

@Entity(name = "Empregado")
@SequenceGenerator(name = "JPAExemploSequence", sequenceName = "SEQ_EXAMPLE_PK")
public class Empregado implements Serializable{

	private static final long serialVersionUID = 8236910451384994292L;

	private Long id;
	private String nome;
	private long salario;
	
	@Column(name="EMP_ID")
	@Id	@GeneratedValue(strategy = GenerationType.IDENTITY, generator="JPAExemploSequence")
	public Long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Column(nullable=false)
	public long getSalario() {
		return salario;
	}

	public void setSalario(long salario) {
		this.salario = salario;
	}

	@Column(nullable=false, length=200)
	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}
	
}
